package com.htdc.web.dao;

import com.htdc.web.bean.Agreement;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

public interface AgreementDao {

    //修改合同（中止合同）
    boolean stopAgreement(@Param("aid") String aid,@Param("date") Date date);

    //通过房源ID查询历史合同
    List<Agreement> showAllAgreementsByRid(Integer rid);

    //查询所有异常合同
    List<Agreement> showAllAbnormalAgreements();

    //添加合同
    boolean addAgreement(@Param("agreement")Agreement agreement);

    //停止合同
    boolean stopAgreement(Agreement agreement);

    //查看所有合同
    List<Agreement> showAllAgreements();

    //根据Aid获取Rid
    List<Integer> getRidsByAid(@Param("aid")String aid);

    //通过AID获取完整合同
    Agreement getAgreementByAid(@Param("aid") String aid);

    //通过项目获取所有合同
    List<Agreement> getAgreementsByProjectID(@Param("projectId")Integer projectId);

}
